import java.util.LinkedList;
import java.util.ListIterator;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-10-03
 * Time: 13:03
 */
public class LinkListTest {
    public static void main(String[] args) {
        LinkedList<Integer> list1 = new LinkedList<>();
        list1.add(1);
        list1.add(2);
        list1.add(3);
        list1.add(4);
        //System.out.println(list1);
        ListIterator<Integer> it = list1.listIterator();
        while(it.hasNext()) {
            System.out.println(it.next());
        }
    }
}
